package com.cxyjy.common;

import com.cxyjy.common.util.ResultCode;

/**
 * @Author: jony
 * @Date : 2025/6/20 09:42
 * @VERSION v1.0
 */
public class BusinessException extends RuntimeException{
    private final ResultCode resultCode;

    public BusinessException(ResultCode resultCode) {
        super(resultCode.getMessage());
        this.resultCode = resultCode;
    }

    public BusinessException(String message) {
        super(message);
        this.resultCode=null;
    }

    public ResultCode getResultCode(){
        return resultCode;
    }
}
